Public Class ValidationForm

  Private Sub CheckLengthButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckLengthButton.Click
    OutputTextBox.Text = dotNetTips.Utility.ValidationHelper.CheckLength(InputTextBox.Text, CInt(Me.MinNumericUpDown.Value), CInt(Me.MaxNumericUpDown.Value)).ToString
  End Sub

  Private Sub ValidDateButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ValidDateButton.Click
    OutputTextBox.Text = String.Empty


    If InputTextBox.Text.Length > 0 Then

      OutputTextBox.Text = dotNetTips.Utility.ValidationHelper.IsValidDate(InputTextBox.Text).ToString

    End If

  End Sub

  Private Sub ValidEmailButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ValidEmailButton.Click
    OutputTextBox.Text = String.Empty


    If InputTextBox.Text.Length > 0 Then

      OutputTextBox.Text = dotNetTips.Utility.ValidationHelper.IsValidEmail(InputTextBox.Text).ToString

    End If
  End Sub

  Private Sub ValidNumberButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ValidNumberButton.Click
    OutputTextBox.Text = String.Empty


    If InputTextBox.Text.Length > 0 Then

      OutputTextBox.Text = dotNetTips.Utility.ValidationHelper.IsValidNumber(InputTextBox.Text).ToString

    End If
  End Sub

  Private Sub ValidPhoneButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ValidPhoneButton.Click
    OutputTextBox.Text = String.Empty


    If InputTextBox.Text.Length > 0 Then

      OutputTextBox.Text = dotNetTips.Utility.ValidationHelper.IsValidPhone(InputTextBox.Text).ToString

    End If
  End Sub

  Private Sub ValidSSNButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ValidSSNButton.Click
    OutputTextBox.Text = String.Empty


    If InputTextBox.Text.Length > 0 Then

      OutputTextBox.Text = dotNetTips.Utility.ValidationHelper.IsValidSocialSecurity(InputTextBox.Text).ToString

    End If
  End Sub

  Private Sub ValidStringButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ValidStringButton.Click
    OutputTextBox.Text = String.Empty


    If InputTextBox.Text.Length > 0 Then

      OutputTextBox.Text = dotNetTips.Utility.ValidationHelper.IsValidString(InputTextBox.Text).ToString

    End If
  End Sub

  Private Sub ValidURLButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ValidURLButton.Click
    OutputTextBox.Text = String.Empty


    If InputTextBox.Text.Length > 0 Then

      OutputTextBox.Text = dotNetTips.Utility.ValidationHelper.IsValidUrl(InputTextBox.Text).ToString

    End If
  End Sub

  Private Sub ValidZipButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ValidZipButton.Click
    OutputTextBox.Text = String.Empty


    If InputTextBox.Text.Length > 0 Then

      OutputTextBox.Text = dotNetTips.Utility.ValidationHelper.IsValidPostalCode(InputTextBox.Text).ToString

    End If
  End Sub

  Private Sub ValidFirstLastNameButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ValidFirstLastNameButton.Click
    OutputTextBox.Text = String.Empty


    If InputTextBox.Text.Length > 0 Then

      OutputTextBox.Text = dotNetTips.Utility.ValidationHelper.IsValidFirstLastName(InputTextBox.Text).ToString

    End If
  End Sub
End Class